// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   Res_ControlFuncDTO.java

package com.hfstu.ifs.dto;

import com.hfstu.ifs.model.Action;
import com.hfstu.ifs.model.ControlFunc;
import java.lang.reflect.InvocationTargetException;
import org.apache.commons.beanutils.BeanUtils;

public class Res_ControlFuncDTO
	implements Cloneable
{

	private String id;
	private String parentId;
	private String actionId;
	private String actionCode;
	private String actionName;
	private String bgUrl;
	private String bgClassName;
	private String bgMethodName;
	private String actionParameter;
	private boolean checked;
	private String nodeType;

	public Res_ControlFuncDTO()
	{
		checked = false;
		nodeType = "controlFunc";
	}

	public String getParentId()
	{
		return parentId;
	}

	public void setParentId(String parentId)
	{
		this.parentId = parentId;
	}

	public String getId()
	{
		return id;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public String getActionId()
	{
		return actionId;
	}

	public void setActionId(String actionId)
	{
		this.actionId = actionId;
	}

	public String getActionCode()
	{
		return actionCode;
	}

	public void setActionCode(String actionCode)
	{
		this.actionCode = actionCode;
	}

	public String getActionName()
	{
		return actionName;
	}

	public void setActionName(String actionName)
	{
		this.actionName = actionName;
	}

	public String getBgUrl()
	{
		return bgUrl;
	}

	public void setBgUrl(String bgUrl)
	{
		this.bgUrl = bgUrl;
	}

	public String getBgClassName()
	{
		return bgClassName;
	}

	public void setBgClassName(String bgClassName)
	{
		this.bgClassName = bgClassName;
	}

	public String getBgMethodName()
	{
		return bgMethodName;
	}

	public void setBgMethodName(String bgMethodName)
	{
		this.bgMethodName = bgMethodName;
	}

	public String getActionParameter()
	{
		return actionParameter;
	}

	public void setActionParameter(String actionParameter)
	{
		this.actionParameter = actionParameter;
	}

	public String getNodeType()
	{
		return nodeType;
	}

	public void setNodeType(String nodeType)
	{
		this.nodeType = nodeType;
	}

	public boolean isChecked()
	{
		return checked;
	}

	public void setChecked(boolean checked)
	{
		this.checked = checked;
	}

	public Res_ControlFuncDTO transfer(ControlFunc controlFunc)
	{
		try
		{
			BeanUtils.copyProperties(this, controlFunc);
		}
		catch (IllegalAccessException e)
		{
			e.printStackTrace();
		}
		catch (InvocationTargetException e)
		{
			e.printStackTrace();
		}
		if (controlFunc.getAction() != null)
		{
			setActionId(controlFunc.getAction().getId());
			setActionCode(controlFunc.getAction().getCode());
			setActionName(controlFunc.getAction().getName());
		}
		return this;
	}

	public Object clone()
	{
		Res_ControlFuncDTO o = null;
		try
		{
			o = (Res_ControlFuncDTO)super.clone();
		}
		catch (CloneNotSupportedException e)
		{
			e.printStackTrace();
		}
		return o;
	}
}
